BinRoot = ..\..\Bin

CC=icl
FC=ifort
NVCC=nvcc.exe
LINK=link

ARCH = -arch=sm_21
VER = v5.5

FLAG =  /F100000000
#FLAG = 
FFLAG =/4L132 /check:bounds /warn:argument_checking $(FLAG) /Qmkl
#FFLAG =/4L132 $(FLAG) /Qmkl
#FFLAGS = $(FFLAG) /Qopenmp /Qparallel
FFLAGS = $(FFLAG) /Qopenmp
#FFLAGS = $(FFLAG)

FEPGDIR = c:\fepg.pc
SQLDIR = 
#SQLDIR = ..\..\sqllib64

INCS   =
#INCS   = $(SQLDIR)\proto.h $(SQLDIR)\cnames.h
INC    = -I$(FEPGDIR)\lib\include
#INC    = -I$(SQLDIR) -I$(FEPGDIR)\lib\include
#CUINC = -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include"\
#       -I"C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\common\inc"

LIBS = $(FEPGDIR)\lib\libfepg.a
#LIBS = $(FEPGDIR)\lib\*.a $(SQLDIR)\sqlite.a
#CULIBS = "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\$(VER)\lib\x64\cudart.lib"\
#         "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\$(VER)\lib\x64\cublas.lib"\
#         "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\$(VER)\lib\x64\cusparse.lib"


.SUFFIXES:    .cpp .cu .f .for .obj

.cu.obj:
	$(NVCC) -c $(ARCH) -DWIN32 $< $(CUINC)

.cpp.obj:
	$(CC) -c -DWIN32 $< $(CUINC)
	
.f.obj:
	$(FC) /c $< /Fo$@ $(INC) $(FFLAG)
	
.for.obj:
	$(FC) /c $< /Fo$@ $(INC) $(FFLAGS)
